package cn.lutu.protocol.search;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
;

import java.io.Serializable;
import java.time.LocalDateTime;
/**
 * 用户搜索的文章VO
 * */
@Data
@Document(indexName = "article")
public class ArticleSearchVO implements Serializable {
    @Id
    @Field(type = FieldType.Long)
    private Long id;
    @Field(type = FieldType.Text)
    private String nickName;
    @Field(type = FieldType.Text)
    private String userImgUrl;//头像
    @Field(type = FieldType.Text)
    private String contentImgUrl;//封面
    @Field(type = FieldType.Text,analyzer = "ik_max_word", searchAnalyzer = "ik_max_word")
    private String title;
    private String ip;
    @Field(type = FieldType.Text,analyzer = "ik_max_word", searchAnalyzer = "ik_max_word")
    private String brief;
    @Field(type = FieldType.Integer)
    private Integer commentCount;
    @Field(type = FieldType.Integer)
    private Integer collectCount;
    @Field(type = FieldType.Integer)
    private Integer upCount;
    @Field(type = FieldType.Integer)
    private Integer viewCount;
}
